﻿#Region "IMPORTS"
Imports DAO
#End Region

Public Class MateriaPrima
    Inherits Modelo
    Implements IModelo

#Region "ATRIBUTOS"

    Private _materiaPrimaId As Integer

    Private _descricao As String

    Private _saldo As Integer

    Private _precoCompra As Double

    Private _precoVenda As Double

    Private _observacao As String

    Private _unidadeMedida As UnidadeMedida 

    Private _fabricante As Fabricante 

#End Region

#Region "CONSTRUTOR(S)"

    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub New(ByVal id As Integer)
        MyBase.New()
        Me._materiaPrimaId = id
    End Sub

#End Region

#Region "PROPRIEDADES"

    Public Property Fabricante() As Fabricante
        Get
            Return _fabricante
        End Get
        Set(ByVal value As Fabricante)
            _fabricante = value
        End Set
    End Property
    Public Overridable Property MateriaPrimaId() As Integer
        Get
            Return Me._materiaPrimaId
        End Get
        Set(ByVal value As Integer)
            _materiaPrimaId = value
        End Set
    End Property
    Public Overridable Property Descricao() As String
        Get
            Return Me._descricao
        End Get
        Set(ByVal value As String)
            Me._descricao = value
        End Set
    End Property
    Public Property Observacao() As String
        Get
            Return _observacao
        End Get
        Set(ByVal value As String)
            _observacao = value
        End Set
    End Property
    Public Property PrecoCompra() As Double
        Get
            Return _precoCompra
        End Get
        Set(ByVal value As Double)
            _precoCompra = value
        End Set
    End Property
    Public Property PrecoVenda() As Double
        Get
            Return _precoVenda
        End Get
        Set(ByVal value As Double)
            _precoVenda = value
        End Set
    End Property
    Public Property Saldo() As Integer
        Get
            Return _saldo
        End Get
        Set(ByVal value As Integer)
            _saldo = value
        End Set
    End Property
    Public Property UnidadeMedida() As UnidadeMedida
        Get
            Return _unidadeMedida
        End Get
        Set(ByVal value As UnidadeMedida)
            _unidadeMedida = value
        End Set
    End Property

#End Region

#Region "METODOS OVERRIDES"

    Public Overrides Function ToString() As String
        Return Me.Descricao
    End Function
#End Region
End Class
